import Mock from 'mockjs';
const LoginUsers = [
  {
    id: 1,
    username: 'admin',
    password: '123456',
    avatar: ''
  }
];

const Users = [];
const materiel=[];
const treeList=[];
for (let i = 0; i < 86; i++) {
  Users.push(Mock.mock({
    id: Mock.Random.guid(),
    propCode: 3,
    'levelCode1':/^0\d{1}$/g,
    'cateName': Mock.Random.ctitle(),
    'levelCode2': /^0\d{1}$/g,
    'cateCode': /^30\d{3}$/g

  }));

}
for(let i=0; i<80; i++){
    materiel.push(Mock.mock({
            'id':i+1,
            'itemCode':/^[A-Z]{2}\d{9}$/g,
            'itemName':Mock.Random.ctitle(),
            'cateId':/^[A-Z]\d{9}$/g,
            'model':/^[DCB]-\d{4}[B]$/g,
            'inflamingRetarding':Mock.Random.integer(0, 1),
            'shellStuff':Mock.Random.integer(0, 1),
            'remark':Mock.Random.ctitle(),
            'isDeleted':Mock.Random.integer(0, 1),
            'created':Mock.Random.date(),
            'creator':Mock.Random.cname(),
            'lastModified':Mock.Random.date(),
            'modifier':Mock.Random.cname()

        }
    )
    );

}

treeList.push(Mock.mock({
    id: 1,
    label:3,
    "children|5": [{
        id: 2,
        'label':/^0\d{1}$/g,
        "children|3": [{
            id: 3,
            cateCode: /^03\d{4}/g,
            cateName:/^[A-Z]{3}成品电池2V|电池2V|胶体电池12V/g
        }]
    }]

}));

export { LoginUsers, Users, materiel,treeList};
